package com.ge.modules.entity;

import com.ge.modules.api.apiDTO.TbTechnicianDto;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.UUID;


/**
 * 技师
 *
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-04-20 17:02:43
 */
public class TbTechnicianEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    //
    private Integer technicianId;

    private Integer storeId;
    //技师等级，1:一星级，2:二星级，3:三星级 4:普通用户
    private Integer grade;
    //技师成交订单总金额
    private BigDecimal performance;
    //技师成交订单总数
    private Integer orderCount;
    //技师成交订单的客户人数总数
    private Integer clientCount;
    //技师当天成交订单收入
    private BigDecimal todayOrderIncome;
    //技师当天成交订单数
    private Integer todayOrderCount;
    //技师钱包(金额)，单位分
    private BigDecimal wallet;
    //身份证号码
    private String idcard;
    //证件证书照片
    private String certificatePicture;
    //技师头像
    private String headpicture;
    //电话号码(账号)
    private String mobile;
    //登录密码
    private String password;
    //真实姓名
    private String realname;
    //昵称
    private String nickname;
    //帖子编码
    private String postsCode;
    //个性签名
    private String signature;
    //出生日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    //性别，0:女性，1:男性
    private Integer sex;
    //背景图片
    private String backgroundPicture;
    //技师账号状态，0:未删除，1:已删除
    private Integer deleteType;
    //创建时间
    private Date createTime;
    //工作年限，0:1-3年，1:3-5年，2:5-10年，3:10年以上
    private Integer workAgeLimit;
    //技师类型
    private Integer technicianType;
    //技师是否空闲，0:没空,1:有空
    private Integer isLeisure;
    //用户类型 1用户 2技师 3店铺
    private Integer userType;
    //技师所在的店铺联系电话
    private String storeMobile;
    //提成比例
    private String commissionRate;

    public String getCommissionRate() {
        return commissionRate;
    }

    public void setCommissionRate(String commissionRate) {
        this.commissionRate = commissionRate;
    }

    public String getStoreMobile() {
        return storeMobile;
    }

    public void setStoreMobile(String storeMobile) {
        this.storeMobile = storeMobile;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public TbTechnicianEntity() {
    }

    public TbTechnicianEntity(TbTechnicianEntity tbTechnicianEntity) {
//		this.technicianCode = UUID.randomUUID().toString();
        this.nickname = tbTechnicianEntity.getNickname();
        this.mobile = tbTechnicianEntity.getMobile();
        this.grade = tbTechnicianEntity.getGrade();
        this.deleteType = 0;
        this.createTime = new Date();
    }

    public Integer getTechnicianId() {
        return technicianId;
    }

    public void setTechnicianId(Integer technicianId) {
        this.technicianId = technicianId;
    }

    public Integer getStoreId() {
        return storeId;
    }

    public void setStoreId(Integer storeId) {
        this.storeId = storeId;
    }

    /**
     * 设置：技师等级，0:无星级，1:一星级，2:二星级，3:三星级
     */
    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    /**
     * 获取：技师等级，0:无星级，1:一星级，2:二星级，3:三星级
     */
    public Integer getGrade() {
        return grade;
    }

    /**
     * 设置：技师成交订单总金额
     */
    public void setPerformance(BigDecimal performance) {
        this.performance = performance;
    }

    /**
     * 获取：技师成交订单总金额
     */
    public BigDecimal getPerformance() {
        return performance;
    }

    /**
     * 设置：技师成交订单总数
     */
    public void setOrderCount(Integer orderCount) {
        this.orderCount = orderCount;
    }

    /**
     * 获取：技师成交订单总数
     */
    public Integer getOrderCount() {
        return orderCount;
    }

    /**
     * 设置：技师成交订单的客户人数总数
     */
    public void setClientCount(Integer clientCount) {
        this.clientCount = clientCount;
    }

    /**
     * 获取：技师成交订单的客户人数总数
     */
    public Integer getClientCount() {
        return clientCount;
    }

    /**
     * 设置：技师当天成交订单收入
     */
    public void setTodayOrderIncome(BigDecimal todayOrderIncome) {
        this.todayOrderIncome = todayOrderIncome;
    }

    /**
     * 获取：技师当天成交订单收入
     */
    public BigDecimal getTodayOrderIncome() {
        return todayOrderIncome;
    }

    /**
     * 设置：技师当天成交订单数
     */
    public void setTodayOrderCount(Integer todayOrderCount) {
        this.todayOrderCount = todayOrderCount;
    }

    /**
     * 获取：技师当天成交订单数
     */
    public Integer getTodayOrderCount() {
        return todayOrderCount;
    }

    /**
     * 设置：技师钱包(金额)，单位分
     */
    public void setWallet(BigDecimal wallet) {
        this.wallet = wallet;
    }

    /**
     * 获取：技师钱包(金额)，单位分
     */
    public BigDecimal getWallet() {
        return wallet;
    }

    /**
     * 设置：身份证号码
     */
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    /**
     * 获取：身份证号码
     */
    public String getIdcard() {
        return idcard;
    }

    /**
     * 设置：证件证书照片
     */
    public void setCertificatePicture(String certificatePicture) {
        this.certificatePicture = certificatePicture;
    }

    /**
     * 获取：证件证书照片
     */
    public String getCertificatePicture() {
        return certificatePicture;
    }

    /**
     * 设置：技师头像
     */
    public void setHeadpicture(String headpicture) {
        this.headpicture = headpicture;
    }

    /**
     * 获取：技师头像
     */
    public String getHeadpicture() {
        return headpicture;
    }

    /**
     * 设置：电话号码(账号)
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * 获取：电话号码(账号)
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * 设置：登录密码
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取：登录密码
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置：真实姓名
     */
    public void setRealname(String realname) {
        this.realname = realname;
    }

    /**
     * 获取：真实姓名
     */
    public String getRealname() {
        return realname;
    }

    /**
     * 设置：昵称
     */
    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    /**
     * 获取：昵称
     */
    public String getNickname() {
        return nickname;
    }

    /**
     * 设置：帖子编码
     */
    public void setPostsCode(String postsCode) {
        this.postsCode = postsCode;
    }

    /**
     * 获取：帖子编码
     */
    public String getPostsCode() {
        return postsCode;
    }

    /**
     * 设置：个性签名
     */
    public void setSignature(String signature) {
        this.signature = signature;
    }

    /**
     * 获取：个性签名
     */
    public String getSignature() {
        return signature;
    }

    /**
     * 设置：出生日期
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * 获取：出生日期
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     * 设置：性别，0:女性，1:男性
     */
    public void setSex(Integer sex) {
        this.sex = sex;
    }

    /**
     * 获取：性别，0:女性，1:男性
     */
    public Integer getSex() {
        return sex;
    }

    /**
     * 设置：背景图片
     */
    public void setBackgroundPicture(String backgroundPicture) {
        this.backgroundPicture = backgroundPicture;
    }

    /**
     * 获取：背景图片
     */
    public String getBackgroundPicture() {
        return backgroundPicture;
    }

    /**
     * 设置：技师账号状态，0:未删除，1:已删除
     */
    public void setDeleteType(Integer deleteType) {
        this.deleteType = deleteType;
    }

    /**
     * 获取：技师账号状态，0:未删除，1:已删除
     */
    public Integer getDeleteType() {
        return deleteType;
    }

    /**
     * 设置：创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取：创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置：工作年限，0:1-3年，1:3-5年，2:5-10年，3:10年以
     */
    public void setWorkAgeLimit(Integer workAgeLimit) {
        this.workAgeLimit = workAgeLimit;
    }

    /**
     * 获取：工作年限，0:1-3年，1:3-5年，2:5-10年，3:10年以
     */
    public Integer getWorkAgeLimit() {
        return workAgeLimit;
    }

    public Integer getTechnicianType() {
        return technicianType;
    }

    public void setTechnicianType(Integer technicianType) {
        this.technicianType = technicianType;
    }

    /**
     * 设置：技师是否空闲，0:没空,1:有空
     */
    public void setIsLeisure(Integer isLeisure) {
        this.isLeisure = isLeisure;
    }

    /**
     * 获取：技师是否空闲，0:没空,1:有空
     */
    public Integer getIsLeisure() {
        return isLeisure;
    }

    public TbTechnicianDto toDto() {
        TbTechnicianDto tbTechnicianDto = new TbTechnicianDto();
        tbTechnicianDto.setStoreId(this.getStoreId());
        tbTechnicianDto.setTodayOrderIncome(this.getTodayOrderIncome());
        tbTechnicianDto.setTodayOrderCount(this.getTodayOrderCount());
        tbTechnicianDto.setCertificatePicture(this.getCertificatePicture());
        tbTechnicianDto.setBackgroundPicture(this.getBackgroundPicture());
        tbTechnicianDto.setTechnicianType(this.getTechnicianType());
        tbTechnicianDto.setUserType(this.getUserType());
        tbTechnicianDto.setTechnicianId(this.getTechnicianId());
        tbTechnicianDto.setGrade(this.getGrade());
        tbTechnicianDto.setPerformance(this.getPerformance());
        tbTechnicianDto.setOrderCount(this.getOrderCount());
        tbTechnicianDto.setClientCount(this.getClientCount());
        tbTechnicianDto.setWallet(this.getWallet());
        tbTechnicianDto.setIdcard(this.getIdcard());
        tbTechnicianDto.setHeadpicture(this.getHeadpicture());
        tbTechnicianDto.setMobile(this.getMobile());
        tbTechnicianDto.setPassword(this.getPassword());
        tbTechnicianDto.setRealname(this.getRealname());
        tbTechnicianDto.setNickname(this.getNickname());
        tbTechnicianDto.setSignature(this.getSignature());
        tbTechnicianDto.setBirthday(this.getBirthday());
        tbTechnicianDto.setSex(this.getSex());
        tbTechnicianDto.setDeleteType(this.getDeleteType());
        tbTechnicianDto.setCreateTime(this.getCreateTime());
        tbTechnicianDto.setWorkAgeLimit(this.getWorkAgeLimit());
        tbTechnicianDto.setIsLeisure(this.getIsLeisure());
        tbTechnicianDto.setCommissionRate(this.getCommissionRate());
        return tbTechnicianDto;
    }
}
